package com.veterinaria.actions;

import java.util.ArrayList;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;

import com.opensymphony.xwork2.ActionSupport;
import com.veterinaria.bean.SalarioBean;
import com.veterinaria.services.SalarioImplements;

@ParentPackage(value="ProyVeterinaria")
public class SalarioAction extends ActionSupport{
	
	private ArrayList<SalarioBean> listaSalario;
	SalarioImplements salarioImp=new SalarioImplements();
	
	@Action( value="JSONCargarSalario",results={@Result(name="success",type="json")})
	public String cargarSalario() throws Exception{
		setListaSalario(salarioImp.listarSalarios());
		return SUCCESS;
	}

	public ArrayList<SalarioBean> getListaSalario() {
		return listaSalario;
	}

	public void setListaSalario(ArrayList<SalarioBean> listaSalario) {
		this.listaSalario = listaSalario;
	}

}
